
function fade_up(that){
  var animation = wx.createAnimation({
    duration: '300',
    timingFunction: 'ease',
  })
 
  animation.translate(0, -50).opacity(1).step()
  that.setData({
    animationData: animation.export()
  })


  var animation2 = wx.createAnimation({
    duration: '300',
    timingFunction: 'ease',
  })
  animation2.opacity(1).step()
  that.setData({
    animationData2: animation2.export()
  })


}
function fade_down(that){

  // 内容
  var animation = wx.createAnimation({
    duration: '300',
    timingFunction: 'ease',
  })
 
  animation.translate(0,0).opacity(0).step()
  that.setData({
    animationData: animation.export()
  })


  // 遮罩
  var animation2 = wx.createAnimation({
    duration: '300',
    timingFunction: 'ease',
  })
  animation2.opacity(0).step()
  that.setData({
    animationData2: animation2.export()
  })
}

module.exports = {
  fade_up,
  fade_down
}
